package com.example.forumsystem.demos.web.service;

import com.example.forumsystem.demos.web.model.ArticleInfo;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public interface IArticleService {
    @Transactional
    void create(ArticleInfo article);
    List<ArticleInfo> selectAll();
    List<ArticleInfo> selectAllByBoardId(Long boardId);

    ArticleInfo selectDetailById(Long id);

    void modify(Long id, String title, String content);

    ArticleInfo selectById(Long id);

    void addOneLikeCount(Long id);

    void deleteById(Long id);

    void addOneReplyCountById(Long articleId);

    List<ArticleInfo> selectByUserId(Long id);
}
